// source --> https://instadeco.com/wp-content/plugins/architect-registration/public/js/architect-registration-public.js?ver=2.0 (function ($) { 'use strict'; /** * All of the code for your public-facing JavaScript source * should reside in this file. * * Note: It has been assumed you will write jQuery code here, so the * $ function reference has been prepared for usage within the scope * of this function. * * This enables you to define handlers, for when the DOM is ready: * * $(function() { * * }); * * When the window is loaded: * * $( window ).load(function() { * * }); * * ...and/or other possibilities. * * Ideally, it is not considered best practise to attach more than a * single DOM-ready or window-load handler for a particular page. * Although scripts in the WordPress core, Plugins and Themes may be * practising this, we should strive to set a better example in our own work. */ })(jQuery); var $ = jQuery; $(document).ready(function () { function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $(input).closest('.div_parent').find('.imagePreview').css('background-image', 'url(' + e.target.result + ')'); $(input).closest('.div_parent').find('.imagePreview').addClass('temp_preview'); $(input).closest('.div_parent').find('.imagePreview').hide(); $(input).closest('.div_parent').find('.imagePreview').closest('div').fadeIn(650); if ($(input).closest('.div_parent').find('.imagePreview').find('img').attr('src')) { $(input).closest('.div_parent').find('.imagePreview').find('img').attr('src', ''); $(input).closest('.div_parent').find('.project_image').next().val(''); } // $(input).closest('.div_parent').find('.imagePreview').find('img').attr('src',''); } reader.readAsDataURL(input.files[0]); } } $("#imageUpload").change(function () { readURL(this); }); $("#profile_image").change(function () { readURL(this); }); $(document).on('change', '.project_image', function () { var fileExtension = ['jpeg', 'jpg', 'png', 'gif']; if ($.inArray($(this).val().split('.').pop().toLowerCase(), fileExtension) == -1) { alert("Only formats are allowed : " + fileExtension.join(', ')); $(this).val(''); } else { readURL(this); } }); /** * add new image upload block on click of button */ $(document).on('click', '#add_new_project_image', function (e) { e.preventDefault(); var imageUploadHtml = ''; if ($('#new_post').find('.image-container-block').length > 0) { imageUploadHtml = '
' + $('#new_post').find('.child-image-container-block').first().html() + '
'; $('#new_post').find('.image-container-block').append(imageUploadHtml); $('#new_post .image-container-block:last-child').find('.project_image').val(''); $('#new_post .image-container-block').find('.child-image-container-block').last().find('.projectImage-preview .imagePreview').removeClass('temp_preview'); $('#new_post .image-container-block').find('.child-image-container-block').last().find('.projectImage-preview .imagePreview').css('background-image', ''); $('#new_post .image-container-block').find('.child-image-container-block').last().find('.projectImage-preview .imagePreview img').attr('src', ''); $('#new_post .image-container-block').find('.child-image-container-block').last().find('.project_short_description').val(''); } }); /** * search the architect */ $(document).on('click', '.hz-professionals-directory-search__submit', function (e) { e.preventDefault(); var architectName = $('#architectName').val(); var location = $('#locationName').val(); var isArchitect = $('#is_archtiect').val(); var isDesigner = $('#is_designer').val(); if (architectName != '' || location != '') { $('.architect_result_parent').addClass('processing-request'); $('.architect_result_parent').html('

Processing...

'); $.ajax({ url: crispshop_ajax_object.ajax_url, type: 'POST', data: 'action=sdrs_search_architect&architectName=' + architectName + '&location=' + location + '&isArchitect=' + isArchitect + '&isDesigner=' + isDesigner, dataType: 'json', success: function (res) { var architectHtml = ''; var totalRecord = 0; if (res.success == true) { // architectHtml = ''; var description = ''; if (res.architectData.length > 0) { $.each(res.architectData, function (key, index) { description = index.description; if (description.length > 100) { description = description.substr(0, description.lastIndexOf(' ', 97)); } architectHtml += '
'; architectHtml += ''; architectHtml += 'Experience Centre'; architectHtml += '
'; architectHtml += '
'; architectHtml += '
'; architectHtml += '
'; architectHtml += '
'; architectHtml += ' '; architectHtml += ' '; architectHtml += '
'; architectHtml += '
'; architectHtml += '

' + description + '

'; architectHtml += 'Read more
'; architectHtml += '
'; architectHtml += '
Location : ' + index.city + ', ' + index.state + ' '; architectHtml += '
'; architectHtml += '
'; architectHtml += '
'; totalRecord = key; }); $('#content').find('.total_record').html(totalRecord + 1); $('.architect_result_parent').html(architectHtml); } else { $('.architect_result_parent').html('

Result not found.

'); $('#content').find('.total_record').html(0); } } else { $('.architect_result_parent').html('

Result not found.

'); } }, error: function () { hideLoader(); }, complete: function () { $('.architect_result_parent').removeClass('processing-request'); } }); } }); /** * function for show loader */ function showLoader() { } /** * function for hide Loader */ function hideLoader() { } /** * for set active menu link on my account */ if ($('#my-account-nav').length > 0) { $(document).on('click', 'li.woocommerce-MyAccount-navigation-link a', function () { localStorage.setItem('myAccountUrl', $(this).attr('href')); }); var preUrl = localStorage.getItem('myAccountUrl'); if (preUrl == '') { preUrl = $(location).attr("href"); } var myAccountLiUrl = ''; $.each($('#my-account-nav').find('li.woocommerce-MyAccount-navigation-link'), function () { var self = this; myAccountLiUrl = $(self).find('a').attr('href'); if ($(self).hasClass('is-active')) { $(self).removeClass('is-active active'); } if (preUrl == myAccountLiUrl) { $(self).addClass('is-active active'); } }); } // var currentUrl = $(location).attr("href"); //var qSplitUrl = currentUrl.split('?'); //window.history.pushState({urlPath: qSplitUrl[0]}, '', qSplitUrl[0]); /** * on project add,edit page remove image section */ $(document).on('click', '.remove_project_image', function () { var self = this; if ($(self).closest('.image-container-block').find('.child-image-container-block').length > 1) { $(self).closest('.child-image-container-block').remove(); } }); $(document).on('change', '#reg_isArchitect', function () { var self = this; if ($(self).is(':checked')) { $(self).closest('form').find('#cus_reg_red_url').val('/instadeco.com/my-profile/'); } else { $(self).closest('form').find('#cus_reg_red_url').val('/instadeco.com/my-account/'); } }); /** * delete project */ $(document).on('click', '.delete_project', function (e) { e.preventDefault(); var self = this; var projectId = $(self).closest('tr').attr('data-id'); $(self).closest('tr').addClass('remove_tr'); Swal.fire({ title: 'Are you sure?', text: "You won't be able to revert this!", type: 'warning', showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: 'Yes, delete it!' }).then((result) => { if (result.value) { $.ajax({ url: crispshop_ajax_object.ajax_url, type: 'POST', data: 'action=sdrs_delete_project&projectId=' + projectId, dataType: 'json', success: function (res) { if (res.success == true) { $('.remove_tr').remove(); swal("Project has been deleted!", { icon: "success", }); } else { } }, error: function () { hideLoader(); }, complete: function () { hideLoader(); } }); } else { $('.tempDelete').removeClass('tempDelete'); } }) }); /** * show project image in popup */ $(document).on('click', '.project-img-container', function (e) { e.preventDefault(); var self = this; var imageCategory = $(self).closest('.col-inner').find('.prj-category').html(); var description = $(self).closest('.col-inner').find('.prj-description').html(); var imgSource = $(self).find('.hz-image-container').attr('src'); if ($('#main').find('.project_description_page').length > 0) { Swal.fire({ title: imageCategory, text: description, imageUrl: imgSource, imageAlt: 'Custom image', showConfirmButton: false, showCloseButton: true, width:'100%' }); } }); /** * add active class on project details page */ $(document).on('click','.hz-profile-navigation__item',function(){ var self = this; $(self).closest('.hz-profile-navigation').find('a.hz-profile-navigation__item--active').removeClass('hz-profile-navigation__item--active'); $(self).addClass('hz-profile-navigation__item--active'); }); }); // source --> https://instadeco.com/wp-content/plugins/architect-registration/public/js/tinymce.min.js?ver=2.0 /** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.0.13 (2019-08-06) */ !function(j){"use strict";var i=function(){},q=function(n,r){return function(){for(var e=[],t=0;t+~]|"+at+")"+at+"*"),ht=new RegExp("="+at+"*([^\\]'\"]*?)"+at+"*\\]","g"),mt=new RegExp(lt),gt=new RegExp("^"+ut+"$"),pt={ID:new RegExp("^#("+ut+")"),CLASS:new RegExp("^\\.("+ut+")"),TAG:new RegExp("^("+ut+"|[*])"),ATTR:new RegExp("^"+st),PSEUDO:new RegExp("^"+lt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+at+"*(even|odd|(([+-]|)(\\d*)n|)"+at+"*(?:([+-]|)"+at+"*(\\d+)|))"+at+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+at+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+at+"*((?:-\\d)?\\d*)"+at+"*\\)|)(?=[^-]|$)","i")},vt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,bt=/^[^{]+\{\s*\[native \w/,Ct=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,wt=/[+~]/,xt=/'|\\/g,zt=new RegExp("\\\\([\\da-f]{1,6}"+at+"?|("+at+")|.)","ig"),Et=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{rt.apply(et=ot.call($e.childNodes),$e.childNodes),et[$e.childNodes.length].nodeType}catch(iN){rt={apply:et.length?function(e,t){nt.apply(e,ot.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var Nt=function(e,t,n,r){var o,i,a,u,s,l,c,f,d,h;if((t?t.ownerDocument||t:$e)!==ze&&xe(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||ze).nodeType)&&9!==u)return[];if(Ne&&!r){if(o=Ct.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&Te(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return rt.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&de.getElementsByClassName)return rt.apply(n,t.getElementsByClassName(a)),n}if(de.qsa&&(!Se||!Se.test(e))){if(f=c=qe,d=t,h=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(l=pe(e),(c=t.getAttribute("id"))?f=c.replace(xt,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=l.length;s--;)l[s]=f+Bt(l[s]);d=wt.test(e)&&Dt(t.parentNode)||t,h=l.join(",")}if(h)try{return rt.apply(n,d.querySelectorAll(h)),n}catch(m){}finally{c||t.removeAttribute("id")}}}return ye(e.replace(ct,"$1"),t,n,r)};function St(){var n=[];return function r(e,t){return n.push(e+" ")>he.cacheLength&&delete r[n.shift()],r[e+" "]=t}}function kt(e){return e[qe]=!0,e}function Tt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function At(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Mt(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function Rt(a){return kt(function(i){return i=+i,kt(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Dt(e){return e&&typeof e.getElementsByTagName!==Qe&&e}for(fe in de=Nt.support={},ge=Nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},xe=Nt.setDocument=function(e){var t,s=e?e.ownerDocument||e:$e,n=s.defaultView;return s!==ze&&9===s.nodeType&&s.documentElement?(Ee=(ze=s).documentElement,Ne=!ge(s),n&&n!==function r(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){xe()},!1):n.attachEvent&&n.attachEvent("onunload",function(){xe()})),de.attributes=!0,de.getElementsByTagName=!0,de.getElementsByClassName=bt.test(s.getElementsByClassName),de.getById=!0,he.find.ID=function(e,t){if(typeof t.getElementById!==Qe&&Ne){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},he.filter.ID=function(e){var t=e.replace(zt,Et);return function(e){return e.getAttribute("id")===t}},he.find.TAG=de.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Qe)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[o++];)1===n.nodeType&&r.push(n);return r},he.find.CLASS=de.getElementsByClassName&&function(e,t){if(Ne)return t.getElementsByClassName(e)},ke=[],Se=[],de.disconnectedMatch=!0,Se=Se.length&&new RegExp(Se.join("|")),ke=ke.length&&new RegExp(ke.join("|")),t=bt.test(Ee.compareDocumentPosition),Te=t||bt.test(Ee.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Je=t?function(e,t){if(e===t)return we=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!de.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===$e&&Te($e,e)?-1:t===s||t.ownerDocument===$e&&Te($e,t)?1:Ce?it.call(Ce,e)-it.call(Ce,t):0:4&n?-1:1)}:function(e,t){if(e===t)return we=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:Ce?it.call(Ce,e)-it.call(Ce,t):0;if(o===i)return Tt(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?Tt(a[r],u[r]):a[r]===$e?-1:u[r]===$e?1:0},s):ze},Nt.matches=function(e,t){return Nt(e,null,null,t)},Nt.matchesSelector=function(e,t){if((e.ownerDocument||e)!==ze&&xe(e),t=t.replace(ht,"='$1']"),de.matchesSelector&&Ne&&(!ke||!ke.test(t))&&(!Se||!Se.test(t)))try{var n=(void 0).call(e,t);if(n||de.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(iN){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(zt,Et),e[3]=(e[3]||e[4]||e[5]||"").replace(zt,Et),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Nt.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Nt.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pt.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&mt.test(n)&&(t=pe(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(zt,Et).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Xe[e+" "];return t||(t=new RegExp("(^|"+at+")"+e+"("+at+"|$)"))&&Xe(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Qe&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=Nt.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1)[^>]*$|#([\w\-]*)$)/,Zt=je.Event,en=Xt.makeMap("children,contents,next,prev"),tn=function(e){return void 0!==e},nn=function(e){return"string"==typeof e},rn=function(e,t){var n,r,o;for(o=(t=t||Yt).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},on=function(e,t,n,r){var o;if(nn(t))t=rn(t,bn(e[0]));else if(t.length&&!t.nodeType){if(t=Rn.makeArray(t),r)for(o=t.length-1;0<=o;o--)on(e,t[o],n,r);else for(o=0;o"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Qt.exec(e)))return Rn(t).find(e);if(n[1])for(r=rn(e,bn(t)).firstChild;r;)Gt.call(o,r),r=r.nextSibling;else{if(!(r=bn(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Xt.toArray(this)},add:function(e,t){var n,r,o=this;if(nn(e))return o.add(Rn(e));if(!1!==t)for(n=Rn.unique(o.toArray().concat(Rn.makeArray(e))),o.length=n.length,r=0;r=a.length&&r(o)}))})})},po=function(e){return go(e,mo.nu)},vo=function(n){return{is:function(e){return n===e},isValue:a,isError:l,getOr:$(n),getOrThunk:$(n),getOrDie:$(n),or:function(e){return vo(n)},orThunk:function(e){return vo(n)},fold:function(e,t){return t(n)},map:function(e){return vo(e(n))},mapError:function(e){return vo(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return T.some(n)}}},yo=function(n){return{is:l,isValue:l,isError:a,getOr:W,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(n),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return yo(n)},mapError:function(e){return yo(e(n))},each:i,bind:function(e){return yo(n)},exists:l,forall:a,toOption:T.none}},bo={value:vo,error:yo,fromOption:function(e,t){return e.fold(function(){return yo(t)},vo)}};var Co,wo,xo,zo=function(t){return function(e){return!!e&&e.nodeType===t}},Eo=zo(1),No=function(e){var n=e.map(function(e){return e.toLowerCase()});return function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();return E(n,t)}return!1}},So=function(t){return function(e){if(Eo(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},ko=No(["textarea","input"]),To=zo(3),Ao=zo(8),Mo=zo(9),Ro=zo(11),Do=No(["br"]),_o=So("true"),Bo=So("false"),Oo={isText:To,isElement:Eo,isComment:Ao,isDocument:Mo,isDocumentFragment:Ro,isBr:Do,isContentEditableTrue:_o,isContentEditableFalse:Bo,isRestrictedNode:function(e){return!!e&&!Object.getPrototypeOf(e)},matchNodeNames:No,hasPropValue:function(t,n){return function(e){return Eo(e)&&e[t]===n}},hasAttribute:function(t,e){return function(e){return Eo(e)&&e.hasAttribute(t)}},hasAttributeValue:function(t,n){return function(e){return Eo(e)&&e.getAttribute(t)===n}},matchStyleValues:function(r,e){var o=e.toLowerCase().split(" ");return function(e){var t;if(Eo(e))for(t=0;t\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ei=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ti=/[<>&\"\']/g,ni=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,ri={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};wo={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},xo={"<":"<",">":">","&":"&",""":'"',"'":"'"};var oi=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n>10),56320+(1023&t))):ri[t]||String.fromCharCode(t):xo[e]||Co[e]||(n=e,(r=sr.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},li={},ci={},fi=Xt.makeMap,di=Xt.each,hi=Xt.extend,mi=Xt.explode,gi=Xt.inArray,pi=function(e,t){return(e=Xt.trim(e))?e.split(t||" "):[]},vi=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n